<?php

class MaintainAction extends BaseAction {
	public function index(){
		$this->display();

	}
	
	
	public function email(){
	
		$data['email']= $_POST['email2'];
		 
		$Feedback= D ( 'Feedback' );
		
		if($Feedback->data($data)->add()){
			$this->success('提交成功，我们已经记录，但我们完工时会通知您~~');
			
		}else{
			$this->error('提交失败');
	
		}
	}
	
	
	public function message(){
		
		
		if(empty($_GET['name'])||empty($_GET['email'])||empty($_GET['comments']))
			$this->ajaxReturn ( '', 'error', 0 );
	
		$data['email']= $_GET['email'];
		$data['name']= $_GET['name'];
		$data['comment']= $_GET['comments'];
			
		$Feedback= D ( 'Feedback' );
		
		if($Feedback->data($data)->add()){
			$this->ajaxReturn ( 'success', 'success', 1 );
				
		}else{
			$this->ajaxReturn ( '', 'error', 0 );
		}
	
		
	}
}